CREATE TABLE [dbo].[TDKARD_DOCP]
(
[CO_EMPR] [dbo].[TD_VC_002] NOT NULL,
[CO_PROV] [dbo].[TD_VC_020] NOT NULL,
[CO_TIPO_DOCU] [dbo].[TD_VC_003] NOT NULL,
[NU_DOCU_PROV] [dbo].[TD_VC_020] NOT NULL,
[NU_SECU] [dbo].[TD_IN_001] NOT NULL CONSTRAINT [DF__TDKARD_DO__NU_SE__2D9CB955] DEFAULT ((0)),
[CO_ESTA_DOCU] [dbo].[TD_VC_003] NULL,
[CO_ESTA_ACTU] [dbo].[TD_VC_003] NULL,
[CO_USUA_CREA] [dbo].[TD_VC_008_USUA] NOT NULL CONSTRAINT [DF__TDKARD_DO__CO_US__2E90DD8E] DEFAULT (suser_sname()),
[FE_USUA_CREA] [dbo].[TD_DT_001_SIST] NOT NULL CONSTRAINT [DF__TDKARD_DO__FE_US__2F8501C7] DEFAULT (getdate()),
[CO_USUA_MODI] [dbo].[TD_VC_008_USUA] NOT NULL CONSTRAINT [DF__TDKARD_DO__CO_US__30792600] DEFAULT (suser_sname()),
[FE_USUA_MODI] [dbo].[TD_DT_001_SIST] NOT NULL CONSTRAINT [DF__TDKARD_DO__FE_US__316D4A39] DEFAULT (getdate())
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TDKARD_DOCP] ADD CONSTRAINT [PK__TDKARD_D__1F2F045C6B8FCA2D] PRIMARY KEY CLUSTERED  ([CO_EMPR], [CO_PROV], [CO_TIPO_DOCU], [NU_DOCU_PROV], [NU_SECU]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TDKARD_DOCP] ADD CONSTRAINT [FK__TDKARD_DO__CO_EM__52AF0DCA] FOREIGN KEY ([CO_EMPR]) REFERENCES [dbo].[TMPARA_TESO] ([CO_EMPR])
GO
